struct User {
    username : String,
    email:String,
    sign_in_count:u64,
    active:bool
}
struct Color(i32,i32,i32);
struct Point(i32,i32,i32);

fn build_user(email:String,username:String) ->User{
    User{
        email:email,
        username:username,
        active:true,
        sign_in_count:0,
    }
}

fn main() {
    println!("Hello, world!");
    let user1 = User{
        email:String::from("9035@qq.com"),
        username:String::from("weixuan"),
        active:true,
        sign_in_count:0,
    };

    // 更新语法
    let user2 = User{
        ..user1// 表示user2更新user1的内容
    };
    // tuple struct 可定义了行tuple 的struct
}
